package com.kingdee.eas.custom.bpmworkflow.cbbill.finanContractBill;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;



public abstract class AbstractFinanContractRequestFacadeControllerBean extends AbstractBizControllerBean implements FinanContractRequestFacadeController
{
    protected AbstractFinanContractRequestFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("9A8BC19C");
    }

    public String _createBillXML(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("39b45877-26a2-43be-9cc8-ef48905e4bc9"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__createBillXML(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __createBillXML(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public void _saveBPMWorkFlow(Context ctx, String billId, String procInstId, String procURL, String success) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("27cd7cce-d2eb-46f4-9a88-383659ea788e"), new Object[]{ctx, billId, procInstId, procURL, success});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __saveBPMWorkFlow(ctx, billId, procInstId, procURL, success);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __saveBPMWorkFlow(Context ctx, String billId, String procInstId, String procURL, String success) throws BOSException
    {    	
        return;
    }

    public String _startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("2ff8887c-cdf4-4caa-a8b8-925a7d3060cd"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__startBPMWorkFlow(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public String _stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("49b3dd21-7cf4-4f99-a77b-411ccab7fcbf"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__stopBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

    public void _updateBillState(Context ctx, String billId, int state, String auditorNum) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("37361760-d21f-4775-9020-759ccc3216ad"), new Object[]{ctx, billId, new Integer(state), auditorNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __updateBillState(ctx, billId, state, auditorNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __updateBillState(Context ctx, String billId, int state, String auditorNum) throws BOSException
    {    	
        return;
    }

    public String _viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a995ca21-54ab-467b-a08b-a2c7bc5c05a9"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__viewBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

}